#!/bin/sh
#
# Check out module to specified directory
#
# ModuleCoTreeInto <NFiles> <target dir> <Repository Root>
#

test x$1 != x1 && echo "Please select only one file for module commands" && exit 1
TargetDir=${2:?"TargetDir missing"}
RweRoot=${3:?"RWE missing"}
shift 3

cd $TargetDir;
echo Enter the name of the module you want to check out;
read name;
cvs -d "$RweRoot" -r co $name;
# fix for CVS 1.9 UNIX and below:
# need cvs update to merge CVS/Entries.Log into CVS/Entries for subdirs
cvs -d "$RweRoot" -r update $name;
sniffaccess reload_project '*/';
